﻿/*======================================
作者：洞庭夕照
创建：2017.8.21
网站：www.ninesky.cn
      mzwhj.cnblogs.com
代码：git.oschina.net/ninesky/Ninesky
版本：v1.0.0.0
======================================*/
using Ninesky.Models;
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace Ninesky.IService
{
    /// <summary>
    /// 栏目服务接口
    /// </summary>
    public interface ICategoryService:IBaseService<Category>
    {
        /// <summary>
        /// 查找子栏目
        /// </summary>
        /// <param name="id">栏目Id</param>
        /// <returns>子栏目列表</returns>
        Task<IQueryable<Category>> FindChildrenAsync(int id);

        /// <summary>
        /// 查找栏目列表
        /// </summary>
        /// <param name="predicate">查询表达式</param>
        /// <returns>栏目列表</returns>
        Task<IQueryable<Category>> FindListAsync(Expression<Func<Category, bool>> predicate);

        /// <summary>
        /// 查找栏目
        /// </summary>
        /// <param name="cType">栏目类型[0-未设置]</param>
        /// <param name="mType">内容类型[0-未设置]</param>
        /// <param name="inclParent">是否包含父栏目</param>
        /// <returns>栏目列表</returns>
        Task<IQueryable<Category>> FindListAsync(CategoryType cType, ModuleType mType, bool inclParent);


    }
}
